package com.home.security.browser.shiro;

import org.apache.shiro.session.Session;
import org.apache.shiro.session.mgt.eis.JavaUuidSessionIdGenerator;
import org.apache.shiro.session.mgt.eis.SessionIdGenerator;

import java.io.Serializable;

/**
 * Description: 自定义SessionId生成器
 * Created by 王大宸 on 2020-11-14 2:09
 * Created with IntelliJ IDEA.
 */
public class ShiroSessionIdGenerator implements SessionIdGenerator {

    @Override
    public Serializable generateId(Session session) {
        return new JavaUuidSessionIdGenerator().generateId(session).toString().replaceAll("-", "").toUpperCase();
    }

}
